.class Lcom/htc/android/footprints/view/PictureView$1;
.super Ljava/lang/Object;
.source "PictureView.java"

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/htc/android/footprints/view/PictureView;->setFootprint(Lcom/htc/android/footprints/vo/Footprint;II)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/htc/android/footprints/view/PictureView;


# direct methods
.method constructor <init>(Lcom/htc/android/footprints/view/PictureView;)V
    .locals 0
    .parameter

    .prologue
    .line 134
    iput-object p1, p0, Lcom/htc/android/footprints/view/PictureView$1;->this$0:Lcom/htc/android/footprints/view/PictureView;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 11

    .prologue
    const/4 v10, 0x1

    .line 135
    iget-object v0, p0, Lcom/htc/android/footprints/view/PictureView$1;->this$0:Lcom/htc/android/footprints/view/PictureView;

    #getter for: Lcom/htc/android/footprints/view/PictureView;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;
    invoke-static {v0}, Lcom/htc/android/footprints/view/PictureView;->access$000(Lcom/htc/android/footprints/view/PictureView;)Lcom/htc/android/footprints/vo/Footprint;

    move-result-object v0

    iget-object v1, p0, Lcom/htc/android/footprints/view/PictureView$1;->this$0:Lcom/htc/android/footprints/view/PictureView;

    #getter for: Lcom/htc/android/footprints/view/PictureView;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;
    invoke-static {v1}, Lcom/htc/android/footprints/view/PictureView;->access$000(Lcom/htc/android/footprints/view/PictureView;)Lcom/htc/android/footprints/vo/Footprint;

    move-result-object v1

    iget-object v1, v1, Lcom/htc/android/footprints/vo/Footprint;->mPicPath:Ljava/lang/String;

    if-nez v1, :cond_0

    const-string v1, ""

    :goto_0
    iput-object v1, v0, Lcom/htc/android/footprints/vo/Footprint;->mPicPath:Ljava/lang/String;

    .line 138
    :try_start_0
    iget-object v9, p0, Lcom/htc/android/footprints/view/PictureView$1;->this$0:Lcom/htc/android/footprints/view/PictureView;

    invoke-static {}, Lcom/htc/android/footprints/utils/camera/FootprintImageManager;->getInstance()Lcom/htc/android/footprints/utils/camera/FootprintImageManager;

    move-result-object v0

    iget-object v1, p0, Lcom/htc/android/footprints/view/PictureView$1;->this$0:Lcom/htc/android/footprints/view/PictureView;

    #getter for: Lcom/htc/android/footprints/view/PictureView;->photoView:Landroid/graphics/Bitmap;
    invoke-static {v1}, Lcom/htc/android/footprints/view/PictureView;->access$100(Lcom/htc/android/footprints/view/PictureView;)Landroid/graphics/Bitmap;

    move-result-object v1

    new-instance v2, Ljava/io/File;

    iget-object v3, p0, Lcom/htc/android/footprints/view/PictureView$1;->this$0:Lcom/htc/android/footprints/view/PictureView;

    #getter for: Lcom/htc/android/footprints/view/PictureView;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;
    invoke-static {v3}, Lcom/htc/android/footprints/view/PictureView;->access$000(Lcom/htc/android/footprints/view/PictureView;)Lcom/htc/android/footprints/vo/Footprint;

    move-result-object v3

    iget-object v3, v3, Lcom/htc/android/footprints/vo/Footprint;->mPicPath:Ljava/lang/String;

    invoke-direct {v2, v3}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    iget-object v3, p0, Lcom/htc/android/footprints/view/PictureView$1;->this$0:Lcom/htc/android/footprints/view/PictureView;

    invoke-virtual {v3}, Lcom/htc/android/footprints/view/PictureView;->getContext()Landroid/content/Context;

    move-result-object v3

    iget-object v4, p0, Lcom/htc/android/footprints/view/PictureView$1;->this$0:Lcom/htc/android/footprints/view/PictureView;

    #getter for: Lcom/htc/android/footprints/view/PictureView;->mPhotoWidth:I
    invoke-static {v4}, Lcom/htc/android/footprints/view/PictureView;->access$200(Lcom/htc/android/footprints/view/PictureView;)I

    move-result v4

    iget-object v5, p0, Lcom/htc/android/footprints/view/PictureView$1;->this$0:Lcom/htc/android/footprints/view/PictureView;

    #getter for: Lcom/htc/android/footprints/view/PictureView;->mPhotoWidth:I
    invoke-static {v5}, Lcom/htc/android/footprints/view/PictureView;->access$200(Lcom/htc/android/footprints/view/PictureView;)I

    move-result v5

    const/4 v6, 0x2

    const/4 v7, 0x1

    invoke-virtual/range {v0 .. v7}, Lcom/htc/android/footprints/utils/camera/FootprintImageManager;->getScaledImage(Landroid/graphics/Bitmap;Ljava/io/File;Landroid/content/Context;IIIZ)Landroid/graphics/Bitmap;

    move-result-object v0

    #setter for: Lcom/htc/android/footprints/view/PictureView;->photoView:Landroid/graphics/Bitmap;
    invoke-static {v9, v0}, Lcom/htc/android/footprints/view/PictureView;->access$102(Lcom/htc/android/footprints/view/PictureView;Landroid/graphics/Bitmap;)Landroid/graphics/Bitmap;
    :try_end_0
    .catch Ljava/lang/OutOfMemoryError; {:try_start_0 .. :try_end_0} :catch_0

    .line 148
    :goto_1
    iget-object v0, p0, Lcom/htc/android/footprints/view/PictureView$1;->this$0:Lcom/htc/android/footprints/view/PictureView;

    #setter for: Lcom/htc/android/footprints/view/PictureView;->photoReady:Z
    invoke-static {v0, v10}, Lcom/htc/android/footprints/view/PictureView;->access$302(Lcom/htc/android/footprints/view/PictureView;Z)Z

    .line 149
    iget-object v0, p0, Lcom/htc/android/footprints/view/PictureView$1;->this$0:Lcom/htc/android/footprints/view/PictureView;

    const/4 v1, 0x0

    #setter for: Lcom/htc/android/footprints/view/PictureView;->mRunnable:Ljava/lang/Runnable;
    invoke-static {v0, v1}, Lcom/htc/android/footprints/view/PictureView;->access$402(Lcom/htc/android/footprints/view/PictureView;Ljava/lang/Runnable;)Ljava/lang/Runnable;

    .line 150
    return-void

    .line 135
    :cond_0
    iget-object v1, p0, Lcom/htc/android/footprints/view/PictureView$1;->this$0:Lcom/htc/android/footprints/view/PictureView;

    #getter for: Lcom/htc/android/footprints/view/PictureView;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;
    invoke-static {v1}, Lcom/htc/android/footprints/view/PictureView;->access$000(Lcom/htc/android/footprints/view/PictureView;)Lcom/htc/android/footprints/vo/Footprint;

    move-result-object v1

    iget-object v1, v1, Lcom/htc/android/footprints/vo/Footprint;->mPicPath:Ljava/lang/String;

    goto :goto_0

    .line 143
    :catch_0
    move-exception v0

    move-object v8, v0

    .line 144
    .local v8, e:Ljava/lang/OutOfMemoryError;
    const-string v0, "PictureViewNew"

    const-string v1, "this bitmap will cause OutOfMemory, so skip it"

    invoke-static {v0, v1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

    .line 145
    iget-object v0, p0, Lcom/htc/android/footprints/view/PictureView$1;->this$0:Lcom/htc/android/footprints/view/PictureView;

    iget-object v1, p0, Lcom/htc/android/footprints/view/PictureView$1;->this$0:Lcom/htc/android/footprints/view/PictureView;

    invoke-virtual {v1}, Lcom/htc/android/footprints/view/PictureView;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    const v2, 0x7f0200fe

    invoke-static {v1, v2}, Landroid/graphics/BitmapFactory;->decodeResource(Landroid/content/res/Resources;I)Landroid/graphics/Bitmap;

    move-result-object v1

    #setter for: Lcom/htc/android/footprints/view/PictureView;->photoView:Landroid/graphics/Bitmap;
    invoke-static {v0, v1}, Lcom/htc/android/footprints/view/PictureView;->access$102(Lcom/htc/android/footprints/view/PictureView;Landroid/graphics/Bitmap;)Landroid/graphics/Bitmap;

    goto :goto_1
.end method
